home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / utils1 / iotest.arj / IO_TEST.TXT < prev    next >
Text File  |  1993-12-09  |  54KB  |  1,174 lines

  1.  
  2. LAN & PC Engineering
  3.              
  4.              
  5.              
  6.              
  7.              
  8.              
  9.              
  10.              
  11.              
  12.              
  13.              
  14.              IO TEST
  15.              
  16.              PC Disk IO Analyze and Simulation Program
  17.              
  18.              
  19.              
  20.              
  21.              
  22.              
  23.       This series of programs will monitor and analyze the IOs of a PC. The
  24.       results can be used as input to a program that will simulate the IO load of
  25.       a workstation. Such a simulation can be used for network sizing benchmark
  26.       or response time measurements.
  27.              
  28.              
  29.              
  30.              Ref: PCDOC-000-0
  31.              
  32.              November 1993
  33.              
  34.              
  35.              
  36.              
  37.              
  38.              
  39.              
  40.              
  41.              
  42.              
  43.              
  44.              Revision/Update Information:    This is a new document
  45.              
  46.                           
  47.  
  48.              
  49.              
  50.              
  51.                                                                 1
  52.              
  53.                                                          Overview
  54.              
  55.              
  56.              
  57.              
  58.              
  59.              
  60.          This suite of programs was designed with two goals in mind.
  61.        We first needed a tool to accurately simulate and time the disk
  62.        Input/Output (IO) load of a PC. This program can monitor the varia-
  63.        tions in response time on a network for a given period. It will enable
  64.        the network administrator to have scientific clues to judge the typical
  65.        user complaint: "The network is dreadfully slow this morning!". 
  66.        Another use of the simulator is to accurately represent a PC IO load in
  67.        a sizing benchmark. It will help to answer questions like "What is the
  68.        maximum number of workstations of a particular type that a given
  69.        server can handle?".
  70.              
  71.          The second goal was to help us to understand the IO struc-
  72.        ture of a given PC usage.  This tool should assist us in determining
  73.        what files are opened by an application, what are the "HotFiles" (most
  74.        often used files) and thus worthwhile to move to a faster media.  
  75.              
  76.          The first program of the suite is IO_SNOOP,  the IO monitoring
  77.        program. It is loaded as a TSR and will produce a dump of all disk In-
  78.        put/Output operations of a PC. IO_LIST is necessary to interpret the
  79.        binary dump file. It can produce a summary, a detailed list of every IO
  80.        (one line per IO) or a listing of "HotFiles" . Its primary purpose is to
  81.        generate a list of parameters to be used as an input for the simulation
  82.        program: IO_SIMUL.
  83.              
  84.              
  85.              
  86.              
  87.              
  88.              
  89.     Distribution
  90.          This software is a FreeWare also called BeerWare ("Buy me a
  91.        beer if you liked it"). Usage and distribution is free. Money may only
  92.        be charged to cover distribution costs. IO_TEST can be used without re-
  93.        strictions even in a professional or consulting environment.
  94.              
  95.        Comments, bug reports or suggestions for improvements are
  96.        welcomed. If it was really of great use to you and you want to make
  97.        me a pleasure, you can either buy me a beer if we meet, buy me good
  98.        computer books as they tend to be fairly expensive here in Belgium or
  99.        buy some toys for my one year old daughter, Deborah, so that she
  100.        stops pushing on the reset button of my PC ;-)
  101.              
  102.              
  103.        The following files  constitute the distribution kit:
  104.              
  105.          IOTEST.ZIP
  106.               IO_SNOOP.EXE   Monitoring TSR
  107.               IO_LIST.EXE    Dump Analyze Program
  108.               IO_SIMUL.EXE   PC Load simulator
  109.               IO_DUMP.EXE    Dump file debugging tool
  110.               STRDATE.EXE    Sets date as environment variable
  111.               MERGEDBF.EXE   Concatenates HotFiles databases
  112.               PAK.BAT        Sample self-extracting test distribution kit building
  113.                              procedure
  114.               INSTALL.BAT    Sample test distribution kit installation procedure
  115.               IO_TEST.BAT    Sample test procedure
  116.               IO_TEST.TXT    ASCII documentation
  117.              
  118.          IODOC.ZIP
  119.               IO_TEST.TXT    ASCII documentation
  120.               IO_TEST.PS     Postscript documentation
  121.              
  122.              
  123.              
  124.              
  125.              
  126.              
  127.              
  128.           How it was written
  129.              
  130.              
  131.                IO_TEST was written as an
  132.              activity of the "Banksys Midnight
  133.              Project Computer Club". This informal
  134.              club handles PC programming projects
  135.              that cannot be justified during normal
  136.              working hours but are useful for the
  137.              Company. Practical exploration of all
  138.              aspects of the computer technology is
  139.              the primary drive of our club. Its ac-
  140.              tivities are sponsored by the "Lan &
  141.              PC Engineering" group of Banksys
  142.              (whose member form the core of the
  143.              club). Banksys is the company han-
  144.              dling the debit and credit card net-
  145.              work in Belgium.
  146.              
  147.                The programs were written with the Borland C++ compiler
  148.              version 3.1. Some special functions were implemented by using special-
  149.              ized libraries as "CodeBase 4.5" for the database part, "Resident C" for
  150.              the TSR and "UseLib" for the PathWork specific informations.
  151.                                 IO_TEST has been mainly written by myself but with the great
  152.              help of Michel Valentin who wrote IO_SNOOP. Without his help this
  153.              project wouldn't have turned out like it has. Many thanks to Chris
  154.              Lord from Digital Central Engineering (PCI group) who gave me many
  155.              encouragements and very good advice in numerous informal projects. I
  156.              would like to take this opportunity to thank Chris for his top notch
  157.              (and spectacular) presentations during the DECUS Symposiums (Digital
  158.              Users Society) and especially his "Advanced Topics in PC Memory
  159.              Management" seminar. Many thanks to Alan Sharkey of Digital (UK)
  160.              for his fruitful input in discussions in the early stages of the project. I
  161.              would also like to extend my thanks to Scott Barrielle and Brad
  162.              Cooper of ISA Consulting for their encouragement.
  163.              
  164.                A very special thank to my wife Ghislaine, for her tender sup-
  165.              port and quiet patience for my (sometimes excessive) enthusiasm and 
  166.              long programming hours at home. 
  167.              
  168.              
  169.                          Brussels, December 1993,
  170.              
  171.              
  172.              
  173.              
  174.                     Jean-Marc MEESSEN
  175.                     Banksys LAN & PC Engineering Coordinator
  176.              
  177.              
  178.              
  179.                       Compuserve:       100016,661
  180.                       Internet:         100016.661@COMPUSERVE.COM
  181.                       Phone:            (32)-2-727-6004
  182.                       Fax:              (32)-2-256-6438
  183.              
  184.                       Mail:             Banksys sa/nv
  185.                                         Chaussée de Haecht, 1442
  186.                                         B-1130 Bruxelles
  187.                                                      BELGIUM              
  188.              
  189.              
  190.              
  191.                                                                 2
  192.              
  193.                                                          IO_SNOOP
  194.              
  195.              
  196.              
  197.              
  198.              
  199.                This program is the TSR that will collect all disk IO
  200.              informations and dump them to a binary file. The DOS interrupt 21h is
  201.              hooked so that the disk IO functions can be monitored. Disk IO under
  202.              Windows can be monitored as long as they are done through DOS
  203.              int 21h. 
  204.                It takes approximatively 22.8 Kb of conventional memory.
  205.              IO_SNOOP has mainly been tested under MS-DOS 5.0. Some tests have
  206.              been conducted under V6.0.
  207.              
  208.              
  209.              Usage : 
  210.              
  211.                IO_SNOOP pathname | /U | /D | /E
  212.              
  213.               pathname :      output filename.
  214.               /U :  Unload IO_SNOOP.
  215.               /D :  Disable logging.
  216.               /E :  Enable logging.
  217.              
  218.              
  219.              
  220.              
  221. Parameters description
  222.              
  223.              
  224.      pathname:      This is the name of the binary dump file that will contains the IO
  225.              informations. The data is stored in a 4 Kb buffer that is flushed to the
  226.              dump file when it gets full. This must be kept in mind if the computer
  227.              is turned off without unloading IO_SNOOP or disabling logging.
  228.              If a file of that name already exist, the new information is appended to
  229.              it.
  230.              
  231.              
  232.   /U:         Allows to unload the program from memory if it was the last to be
  233.                            loaded. The buffers are flushed and the dump file closed.
  234.              
  235.              
  236.   /D:         Disable the logging of IO events and flushes the buffers and closes the
  237.                            dump file. 
  238.              
  239.              
  240.   /E:         Re-enables the logging after it has been suspended by /D.
  241.              
  242.              
  243.              
  244.              The following INT 21h Functions logged:
  245.              
  246.              Note:  a full description of the binary dump file layout is available at
  247.                                  the end of this documentation.
  248.              
  249.              0F     :    FCB open   
  250.              10     :    FCB close   
  251.              11     :    FCB search first   
  252.              12     :    FCB search next   
  253.              13     :    FCB delete   
  254.              14     :    FCB read   
  255.              15     :    FCB write   
  256.              16     :    FCB create   
  257.              21     :    FCB random read   
  258.              22     :    FCB random write   
  259.              27     :    FCB random block read   
  260.              28     :    FCB random block write   
  261.              3C     :    Create file 
  262.              3D     :    Open file 
  263.              3E     :    Close file 
  264.              3F     :    Read file 
  265.              40     :    Write file 
  266.              41     :    Delete file 
  267.              42     :    Lseek 
  268.              4B     :    Exec file 
  269.              4E     :    Find first 
  270.              4F     :    Find next 
  271.              5C     :    Flock
  272.              6C     :    Extended open/create file 
  273.              
  274.                                         
  275.              
  276.              
  277.              
  278.                                                                 3
  279.              
  280.                                                           IO_LIST
  281.              
  282.              
  283.              
  284.              
  285.                This program will analyze a dump file produced by IO_SNOOP
  286.              and generate different types of outputs: a summary, a detailed log, a
  287.              "HotFiles" listing or a profile that can be used as an input for the
  288.              simulation program.
  289.              
  290.              Usage:
  291.              
  292.              IO_LIST input filename [switches] [@response file]
  293.              
  294.              Input_Filename   Name of the IO_SNOOP dump file to be analyzed
  295.              @file  specifies a response file name (list of commands)
  296.              /?     Prints this help text
  297.              /Output[=file]   Specifies an output file
  298.              /Dbase_output[=file]  Specifies a DBASE output file
  299.              /Spreadsheet[=file]   specifies a file for a spreadsheet usable summary
  300.              /Simulator[=file]     generates an input file for the IO Simulator Program
  301.              /Full  full detail (one line per IO)
  302.              /Hotfiles   analyses the access on a "per file" base
  303.              
  304.              Note:  commands are not case sensitive and can be abbreviated up to
  305.                                  the point where it becomes ambiguous.
  306.              
  307.              
  308.              
  309.      Parameters description
  310.              
  311.              
  312.      Input Filename indicates the path of the dump file generated by IO_SNOOP.
  313.              
  314.              
  315.      @file     will execute the list of valid IO_LIST command contained in the file. It
  316.                             can contain a single or multiple commands per line. A line starting
  317.                             with ";" is considered as a comment.
  318.              
  319.              
  320.         /?     Displays a list of valid commands.
  321.              
  322.                           
  323.      /Output[=file] The analyze and/or the full display is redirected to the specified file, or
  324.                                  if the name is omitted, to the input filename with the suffix ".OUT". If
  325.                                  the file already exists, the user has the choice between creating a new
  326.                                  one, appending to the existing or quitting the program.
  327.              If no output is specified, all the requested informations are displayed
  328.              to the screen. At every screenfull, the display is paused and the user
  329.              can choose either to show the next screenfull, show it without pausing
  330.              or aborting.
  331.              
  332.              A typical summary output can be seen here after. For a more detailed
  333.              explanation, see the section "Summary display description".
  334.              
  335.              
  336.          Capture start at 11-NOV-1993  20:45:06
  337.          
  338.          Summary:
  339.          
  340.             Input file: TEST.DMP
  341.          
  342.             Start time: 20:45:06
  343.             End Time:   23:52:58
  344.          
  345.             Elapsed Time: 3 hour, 7 min, 52 sec   (11272 sec)
  346.          
  347.           FCB SearchFirst        13
  348.           FCB SearchNext        146
  349.           FCB Delete              1
  350.           Create File           109
  351.           Open File             552
  352.           Real Close File       659
  353.           Dummy Close File      445
  354.           Delete File            15
  355.           Lseek                1417
  356.           Execute file           17
  357.           Find First           1714
  358.           Find Next             375
  359.           Seq Large Read       1912     Average size:   4107 Bytes
  360.           Rnd Large Read        590     Average size:   4389 Bytes
  361.           Seq Small Read       4961     Average size:   1900 Bytes
  362.           Rnd Small Read        427     Average size:   1396 Bytes
  363.           Seq Large Write       673     Average size:   4766 Bytes
  364.           Rnd Large Write       198     Average size:   8005 Bytes
  365.           Seq Small Write       780     Average size:   1461 Bytes
  366.           Rnd Small Write        30     Average size:    721 Bytes
  367.          
  368.           TOTAL             15035
  369.          
  370.          List of executed files
  371.              20:45:37.8   C:\BORLANDC\BIN\BC.EXE
  372.              20:45:41.7   C:\BORLANDC\BIN\DPMILOAD.EXE
  373.              20:48:37.9   C:\COMMAND.COM
  374.              22:13:05.0   C:\COMMAND.COM
  375.              22:13:09.6   C:\JMM\IO_SNOOP\IO_SNOOP.EXE
  376.          (...)
  377.          
  378.          Small Read and Write repartition            (Size smaller then 4000 bytes)
  379.          
  380.                     Seq Read   Rnd Read  Seq Write   Rnd Write
  381.          <   100       1054        71        232        20
  382.          <   200         41        28          0         0
  383.          <   300         72         6          0         0
  384.          <   400         40        22          0         0
  385.          <   500         38        13          0         0
  386.          <   600         76         9          1         0
  387.          (...)
  388.          
  389.          Large Read and Write repartition            (Size larger then 4000 bytes)
  390.          
  391.                     Seq Read   Rnd Read  Seq Write   Rnd Write
  392.          <  5500       1911       575        657       180
  393.          <  7000          0         6          0         0
  394.          <  8500          0         3          0         0
  395.          < 10000          0         0          0         0
  396.          < 11500          0         0          0         0
  397.          < 13000          0         0          0         0
  398.          (...)
  399.                       
  400.      /Dbase_output[=file]     Specifies whether a detailed interpretation of the dump file is stored in
  401.                                            an Xbase format (one record per IO). If the name is omitted, it will
  402.                                            default to the input filename with the suffix ".DBF". In the case that
  403.                                            the file already exists, the user has the choice between creating a new
  404.                                            one, appending to the existing or quitting the program.
  405.              
  406.              The database layout is: 
  407.              
  408.                Field Type   WidthDecimal
  409.                TIME    C    12     0
  410.                FUNCTION       C   2     0
  411.                HANDLE  N     2     0
  412.                F_NAME  C    80     0
  413.                SIZE    N    10     0
  414.              
  415.              
  416.              
  417.              
  418.       /Spreadsheet[=file]     This command will generate a summary in an ASCII file, delimited so
  419.                                            that it can be imported in a spreadsheet. It has been used with Lotus
  420.                                            123 for Windows (v1.1). If the name is omitted, it will default to the
  421.                                            input filename with the suffix ".PRN". In the case that the file al-
  422.                                            ready exists, the user has the choice between creating a new one,
  423.                                            appending to the existing or quitting the program.
  424.              
  425.              
  426.              
  427.              
  428.       /Simulator[=file]  With this command, a simulator input data file will created. If the
  429.                                       name is omitted, it will default to the input filename with the suffix
  430.                                       ".SIM". In the case that the file already exists, the user has the
  431.                                       choice between creating a new one, appending to the existing or
  432.                                       quitting the program.
  433.              This file is a snapshot of all IOs collected. The suggested values will
  434.              total up to 2000 IO per test.
  435.              
  436.              
  437.              ; IO_SIMUL input file (usage: "IO_SIMUL [options] @TEST.SIM)"
  438.              ; Ratio used: 7
  439.              ;
  440.              ;
  441.              BigReadCnt         =  273   BigReadSize         =   4107
  442.              SmallReadCnt       =  708   SmallReadSize       =   1900
  443.              BigWriteCnt        =   96   BigWriteSize        =   4766
  444.              SmallWriteCnt      =  111   SmallWriteSize      =   1461
  445.              RandBigReadCnt     =   84   RandBigReadSize     =   4389
  446.              RandSmallReadCnt   =   61   RandSmallReadSize   =   1396
  447.              RandBigWriteCnt    =   28   RandBigWriteSize    =   8005
  448.              RandSmallWriteCnt  =    4   RandSmallWriteSize  =    721
  449.              Create             =   15
  450.              OpenClose          =   78
  451.              FindFirst          =  244
  452.              FindNext           =   53
  453.              
  454.                           
  455.           /Full     This toggle switch allows to display (or save to a file defined by /OUT-
  456.              PUT) one line per Input/Output operation.
  457.              
  458.              This is a sample output.
  459.              
  460.          Capture start at 11-NOV-1993  14:45:06
  461.          14:45:06.0 <- CloseFile      (#05) empty SFT - Dummy close
  462.          14:45:06.0 <- CloseFile      (#06) empty SFT - Dummy close
  463.          14:45:06.0 <- CloseFile      (#07) empty SFT - Dummy close
  464.          14:45:06.0 <- CloseFile      (#08) empty SFT - Dummy close
  465.          14:45:06.0 <- CloseFile      (#09) empty SFT - Dummy close
  466.          14:45:06.0 <- CloseFile      (#10) empty SFT - Dummy close
  467.          14:45:06.0 <- CloseFile      (#11) empty SFT - Dummy close
  468.          14:45:06.0 <- CloseFile      (#12) empty SFT - Dummy close
  469.          14:45:06.0 <- CloseFile      (#13) empty SFT - Dummy close
  470.          14:45:06.0 <- CloseFile      (#14) empty SFT - Dummy close
  471.          14:45:06.0 <- CloseFile      (#15) empty SFT - Dummy close
  472.          14:45:06.0 <- CloseFile      (#16) empty SFT - Dummy close
  473.          14:45:06.0 <- CloseFile      (#17) empty SFT - Dummy close
  474.          14:45:06.0 <- CloseFile      (#18) empty SFT - Dummy close
  475.          14:45:06.0 <- CloseFile      (#19) empty SFT - Dummy close
  476.          14:45:37.2   FindFirst       bc.???
  477.          14:45:37.2   FindNext
  478.          14:45:37.2   FindFirst       C:\DOS\bc.???
  479.          14:45:37.3   FindFirst       C:\WINDOWS\bc.???
  480.          14:45:37.4   FindNext
  481.          14:45:37.4   FindNext
  482.          14:45:37.4   FindFirst       C:\MOUSE\bc.???
  483.          14:45:37.5   FindFirst       C:\UTIL\bc.???
  484.          14:45:37.6   FindFirst       C:\GMKW\bc.???
  485.          14:45:37.7   FindFirst       C:\BORLANDC\BIN\bc.???
  486.          14:45:37.7   FindNext
  487.          14:45:37.7   FindNext
  488.          14:45:37.7   FindNext
  489.          14:45:37.8   ExecuteFile     C:\BORLANDC\BIN\BC.EXE
  490.          14:45:38.0 -> OpenFile       (#5/3) C:\BORLANDC\BIN\BC.EXE
  491.          14:45:38.0   LseekFile       (#5/3) C:\BORLANDC\BIN\BC.EXE
  492.          14:45:38.0   LseekFile       (#5/3) C:\BORLANDC\BIN\BC.EXE
  493.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  494.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  495.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  496.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  497.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  498.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  499.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  500.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  501.          14:45:38.1   ReadFile        (#5/3) C:\BORLANDC\BIN\BC.EXE     3072 Bytes
  502.          (...)
  503.          
  504.          
  505.              
  506.                The first line of this sample indicates when the measurement
  507.              started (Time Stamp Record). There will be such a line every time the
  508.              capture is started or re-started after a suspension. 
  509.              For each IO, the time is given in "Hour:Minute:Second.TenthOfSec-
  510.              onds" format.  The next element is a mnemonic word representing the
  511.              IO operation. It is prefixed with a "->" for an open or assimilated
  512.              operation and a "<-" for a close operation. The group (#x/y) is com-
  513.              posed of the handle number (x) and the SFT (System File Table) entry
  514.              number (y) corresponding to the handle.
  515.              
  516.                This sample, where the Borland IDE was started just after
  517.              IO_SNOOP, can be interpreted in the following way. Exiting the program
  518.              causes DOS to close automatically all file handles even if they have not
  519.              been assigned. This type of IO is called here a "dummy close". The
  520.              command "BC" was then typed at the prompt. This caused the path to
  521.              be searched to find the BC.EXE file. Half a second and 13 IOs were
  522.              necessary to find it. This shows the necessity to keep the search path
  523.              as short as possible! 
  524.              As the file was found, it is then executed, that means opened and read
  525.              in 3072 bytes chunks.
  526.                           
  527.       /Hotfiles     This other toggle switch will generate a list of accessed files sorted in
  528.                                  descending order. It will be displayed either on screen or written into
  529.                                  the file designated by the "/Output" parameter. To build the list, a
  530.                                  temporary database file is generated (HOTFILES.DBF) as its associated
  531.                                  FoxPro Index file HOTFILES.CDX.
  532.              
  533.              
  534.          Filename        Open    Read   Write   Total
  535.          
  536.          C:\BORLANDC\BIN\BC.EXE     6    3533       0   3539
  537.          C:\JMM\IO_SNOOP\IO_LIST.SYM       38     662    508 1208
  538.          C:\JMM\IO_SNOOP\IO_LIST.EXE       18     486    336  840
  539.          C:\BORLANDC\LIB\CL.LIB    16     688       0    704
  540.          C:\JMM\IO_SNOOP\B4.LIB    16     574       0    590
  541.          C:\JMM\BENCHDSK\IO_SIMUL.SYM      16     289    204  509
  542.          C:\JMM\IO_SNOOP\IO_LIST.C 60      23     320    403
  543.          C:\JMM\IO_SNOOP\LLIST.OBJ  8     258      12    278
  544.          C:\JMM\IO_SNOOP\IO_LIST.OBJ7     140      80    227
  545.          C:\JMM\BENCHDSK\IO_SIMUL.C23      27      90    140
  546.          C:\BORLANDC\LIB\MATHL.LIB 16     103       0    119
  547.          C:\COMMAND.COM    13      98       0     111
  548.          C:\BORLANDC\BIN\TCCONFIG.TC       12      69 0   81
  549.          C:\BORLANDC\LIB\EMU.LIB   16      64       080
  550.          C:\BORLANDC\BIN\DPMI16BI.OVL       9      63 0   72
  551.          C:\JMM\IO_SNOOP\PARSECMD.OBJ       7      56 8   71
  552.          
  553.          FILENAME is the full file name of the file accessed. OPEN, READ and
  554.              WRITE is the type of access made to the file. The TOTAL column is the
  555.              sum of the three categories of IO. It is on that information that the sort
  556.              is done.
  557.              
  558.              Different "HotFiles" analyze database can be merged and sorted using
  559.              the same method by using the MERGEDBF utility (see that section).
  560.              This can be useful when analyzing measurements made over a longer
  561.              period and an overall HotFile picture is needed. 
  562.              
  563.              
  564.              The HOTFILES database layout is: 
  565.              
  566.                Field Type   WidthDecimal
  567.                F_NAME  C    80     0
  568.                OPEN_CNT       N  10     0
  569.                READ_CNT       N  10     0
  570.                WRITE_CNT      N  10     0
  571.                TOTAL_CNT      N  10     0
  572.              
  573.              
  574.              
  575.              
  576.                           
  577.              
  578.       "Summary" display description
  579.              
  580.              
  581.              The first part gives general information about the dump file such as
  582.              the filename, the start/end time and the elapsed time.
  583.              
  584.          Capture start at 11-NOV-1993  20:45:06
  585.          
  586.          Summary:
  587.          
  588.             Input file: TEST.DMP
  589.          
  590.             Start time: 20:45:06
  591.             End Time:   23:52:58
  592.          
  593.             Elapsed Time: 3 hour, 7 min, 52 sec   (11272 sec)
  594.          
  595.              
  596.              As capture interruption are recorded, the elapsed time is the exact
  597.              time IO_SNOOP was taking measures.
  598.              
  599.                FCB SearchFirst        13
  600.       FCB SearchNext        146
  601.       FCB Delete              1
  602.       Create File           109
  603.       Open File             552
  604.       Real Close File       659
  605.       Dummy Close File      445
  606.       Delete File            15
  607.       Lseek                1417
  608.       Execute file           17
  609.       Find First           1714
  610.       Find Next             375
  611.       Seq Large Read       1912     Average size:   4107 Bytes
  612.       Rnd Large Read        590     Average size:   4389 Bytes
  613.       Seq Small Read       4961     Average size:   1900 Bytes
  614.       Rnd Small Read        427     Average size:   1396 Bytes
  615.       Seq Large Write       673     Average size:   4766 Bytes
  616.       Rnd Large Write       198     Average size:   8005 Bytes
  617.       Seq Small Write       780     Average size:   1461 Bytes
  618.       Rnd Small Write        30     Average size:    721 Bytes
  619.      
  620.       TOTAL             15035
  621.       IOs per second     1.33
  622.      
  623.              This section lists the measurements for all the categories of IO moni-
  624.              tored where there is a non zero result. The "Total" is the sum of all
  625.              IOs. The "Number of IOs per second" is a very good indication of the IO
  626.              load of the station analyzed. 
  627.              A "dummy close" is a close automatically performed by DOS at a
  628.              program exit: it closes all file handles even if no file is assigned to it.
  629.              The sizes shown for each Read/Write category is an average size. The
  630.              small Read/Write size is from 1 byte to 4000 bytes. Those informations
  631.              can be useful to determine cache buffer size (block size).
  632.              
  633.              
  634.              List of executed files
  635.              20:45:37.8   C:\BORLANDC\BIN\BC.EXE
  636.              20:45:41.7   C:\BORLANDC\BIN\DPMILOAD.EXE
  637.              20:48:37.9   C:\COMMAND.COM
  638.              22:13:05.0   C:\COMMAND.COM
  639.              22:13:09.6   C:\JMM\IO_SNOOP\IO_SNOOP.EXE
  640.          (...)
  641.          
  642.              This part lists all the files that have been executed during the moni-
  643.              toring period. This can be interesting when trying to know what
  644.              applications were used by typical users.
  645.                           
  646.              Small Read and Write repartition            (Size smaller then 4000 bytes)
  647.          
  648.                     Seq Read   Rnd Read  Seq Write   Rnd Write
  649.          <   100       1054        71        232        20
  650.          <   200         41        28          0         0
  651.          <   300         72         6          0         0
  652.          <   400         40        22          0         0
  653.          <   500         38        13          0         0
  654.          <   600         76         9          1         0
  655.          (...)
  656.          
  657.          Large Read and Write repartition            (Size larger then 4000 bytes)
  658.          
  659.                     Seq Read   Rnd Read  Seq Write   Rnd Write
  660.          <  5500       1911       575        657       180
  661.          <  7000          0         6          0         0
  662.          <  8500          0         3          0         0
  663.          < 10000          0         0          0         0
  664.          < 11500          0         0          0         0
  665.          < 13000          0         0          0         0
  666.          (...)
  667.          
  668.              
  669.              This last pair of list gives a "Gauss repartition" of the average size of
  670.              IOs. In each column is the number of times an IO was made with a size
  671.              within the boundaries (more then the previous line and less then the
  672.              value of the line). Each line represents 100 bytes for the "small" part
  673.              and 1500 bytes for the "large" section.
  674.              Analyzing this data can be useful to adjust the computed average size
  675.              to something more realistic.
  676.              
  677.              
  678.              
  679.              
  680.              
  681.              
  682.       Analyze Strategy
  683.              
  684.              
  685.              Beside the use as a debugging tool, IO_SNOOP can be useful for "know-
  686.              ing" the load of a network. A system administrator should have an
  687.              accurate idea of the type of workstation and workstation usage that
  688.              make up the network he is responsible of.
  689.              
  690.              The first step is to classify the users of the network. From a list of
  691.              connected workstations and users, create a typology of usage such as
  692.              "Secretary", "Terminal Emulation", "Programmer", etc. Knowing the
  693.              proportion of user in each category, you can build a statistically correct
  694.              sample and start looking for volunteers. IO_SNOOP will slightly slow
  695.              down the operation and the dump files can get big! So be sure to have
  696.              enough disk space so that the user will not be penalized for participat-
  697.              ing in the test.
  698.              
  699.              For the statistical quality of the study, the samples should be taken on
  700.              a period long enough (two weeks for example ). It is best to have one
  701.              separate dump file for every day: IO_LIST could have unexpected result
  702.              for dump files spanning several days.
  703.                           
  704.              Here after is a sample batch file (IO_TEST.BAT) that can be added in the
  705.              user startup procedure. It uses a small utility, STRDATE, that sets an
  706.              environment variable with the date. This variable can be use to create
  707.              a different file everyday.
  708.              
  709.          @echo off
  710.          rem Set date as an environment variable
  711.          c:\io_dump\strdate
  712.          rem If there is already a dump file for today don't compress it
  713.          if exist c:\io_dump\%_strdate%.dmp goto done
  714.          c:
  715.          rem Compress and move the previous dump
  716.          c:\io_dump\pkzip -m c:\io_dump\%NODENAME%_IO.ZIP c:\io_dump\*.DMP
  717.          :done
  718.          rem Restart the capture in a file having the date as name
  719.          c:\io_dump\IO_SNOOP c:\io_dump\%_STRDATE%.DMP
  720.          
  721.          
  722.              
  723.              The biggest work is now the analyze of the data. Consolidation should
  724.              be made on a spreadsheet. The " gaussian" repartition of the data is
  725.              very interesting clue. The end result is the setup of a characteristic file
  726.              that could be used as an input to IO_SIMUL for the second part of the
  727.                           study of the network's behavior.               
  728.              
  729.              
  730.              
  731.                                                                 4
  732.              
  733.                                                          IO_SIMUL
  734.              
  735.              
  736.              
  737.              
  738.              
  739.                This program will allow the user to accurately simulate and
  740.              time the IO usage of a PC. A set of benchmark is runed with values
  741.              representing the PC load. Those values are gathered with the help of
  742.              IO_SNOOP / IO_LIST. Measures can be run on a set of drives, at a certain
  743.              interval and a specified number of times. 
  744.              
  745.                This simulation can be useful to measure response time varia-
  746.              tions with the increase of the number of normalized PCs on a particu-
  747.              lar server setup. Drawing a graph with those figures can help in
  748.              "capacity planning" efforts. It will reveal informations like the number
  749.              of PC where performance starts to degrade rapidly.
  750.              
  751.                An other useful usage is having an accurate and realistic tool to
  752.              measure network response time and being able to assess correctly
  753.              "impressions" of unusual network performance.
  754.              
  755.              
  756.              Usage:
  757.              IO_SIMUL Drives [Drives] [@response file] [switches]
  758.              
  759.                  drive:       directory specification to benchmark
  760.                  @file        specifies a response file name (list of commands)
  761.                  /? Prints this help text
  762.                  /interval=min     Interval in minutes between benchmarks
  763.                  /count=n     Number of times the benchmark must run (0 = forever)
  764.                  /logfile[=file]   specifies an output file (default: IO_SIMUL.LOG)
  765.                  /Spreadlog[=file] specifies a spreadsheet import (default: IO_SIMUL.PRN)
  766.              
  767.                  FileSize = n      Size of the test file
  768.                  BigReadCnt   = n  Number of big buffer reads
  769.                  BigReadSize  = n  Size of        "
  770.                  BigWriteCnt  = n  Number of big buffer writes
  771.                  BigWriteSize = n  Size of        "
  772.                  SmallReadCnt = n  Number of small buffer reads
  773.                  SmallReadSize     = n  Size of        "
  774.                  SmallWriteCnt     = n  Number of small buffer writes
  775.                  SmallWriteSize    = n  Size of        "
  776.                  RandBigReadCnt    = n  Number of Random big buffer reads
  777.                  RandBigReadSize   = n  Size of        "
  778.                  RandBigWriteCnt   = n  Number of random big buffer writes
  779.                  RandBigWriteSize  = n  Size of        "
  780.                  RandSmallReadCnt  = n  Number of Random Small buffer reads
  781.                  RandSmallReadSize = n  Size of        "
  782.                  RandSmallWriteCnt = n  Number of random Small buffer writes
  783.                  RandSmallWriteSize     = n  Size of        "
  784.                  FindFirst    = n  Number of first file searches
  785.                  FindNext     = n  Number of subsequent file searches
  786.                  Create       = n  Number of file creations
  787.                  OpenClose    = n  Number of file Open and Close operations
  788.              
  789.              
  790.              Note:  commands are not case sensitive and can be abbreviated up to
  791.                                  the point where it becomes ambiguous.
  792.              
  793.              
  794.              
  795.              
  796.              
  797.      Parameters description
  798.              
  799.              
  800.          Drive:     A drive letter or a series of drive letters to be tested (delimited with a
  801.              space). The drive letter can be a file path. During the benchmark, a
  802.              number of temporary files will be created.
  803.              
  804.              
  805.      @file     will execute the list of valid IO_SIMUL command contained in the file. It
  806.                             can contain a single or multiple commands per line. A line starting
  807.                             with ";" is considered as a comment. Such a list can be generated with
  808.                             IO_LIST and the command /SIMULATOR.
  809.              
  810.              
  811.         /?     Displays a list of valid commands.
  812.              
  813.              
  814.      /interval=min  Specifies the interval, in minutes, between benchmark sets. A set is all
  815.                                  requested test on all drives. The default value is 0 minutes.
  816.              
  817.              
  818.        /count=n     Number of times the benchmark set must run. The default value is 1.
  819.                                  If a value of 0 is specified, the benchmark will run forever, or until it
  820.                                  is interrupted by <CTRL><C>. If interrupted, the user is then asked if
  821.                                  he really wants to quit the benchmark.
  822.              
  823.              
  824.      /logfile[=file]     Specifies the name of an output file. The default file name is
  825.                                       IO_SIMUL.LOG. If the file already exists, the user has the choice between
  826.                                       creating a new one, appending to the existing or quitting the pro-
  827.                                       gram.See next section for a commented output example.
  828.              
  829.              
  830.      /Spreadlog[=file]   Specifies the name of a delimited ASCII file that can be imported in a
  831.                                       spreadsheet. The default filename is IO_SIMUL.PRN. In the case that the
  832.                                       file already exists, the user has the choice between creating a new one,
  833.                                       appending to the existing or quitting the program. See next section for
  834.                                                                             a commented example.
  835.        [values]     List of values to be used during the benchmarks. If none is specified,
  836.              the default values are taken. They represent a typical Windows user
  837.              load with a test file of 1.5 Mb. This size is larger then the default PC
  838.              cache size (1 Mb).  It is generally recommended to turn off caching to
  839.              avoid uncontrollable influence although you might just want to mea-
  840.              sure your cache system.
  841.              
  842.              The default values:
  843.              
  844.                             BigReadCnt = 67  BigReadSize = 8713
  845.                             BigWriteCnt = 2  BigWriteSize = 7218
  846.                             SmallReadCnt = 352    SmallReadSize = 492
  847.                             SmallWriteCnt = 46    SmallWriteSize = 847
  848.                             RandBigReadCnt = 111  RandBigReadSize = 6713
  849.                             RandBigWriteCnt = 3   RandBigWriteSize = 7374
  850.                             RandSmallReadCnt = 285     RandSmallReadSize = 733
  851.                             RandSmallWriteCnt = 29     RandSmallWriteSize = 277
  852.              
  853.                             FindFirst = 513
  854.                             FindNext = 438 
  855.                             Create = 11
  856.                             OpenClose = 142
  857.              
  858.              
  859.              
  860.      Output description
  861.              
  862.              
  863.              While the screen output shows the progress of the benchmark, the
  864.              "logfile" output is a record of all datas gathered during the test. The
  865.              first part of the log file is the list of all parameters used:
  866.              
  867.              
  868.              Benchmark for PC: UNKNOWN
  869.              
  870.              C:  Local drive
  871.              
  872.              Benchmarking protocol: (times in micro seconds)
  873.              
  874.              Total temporary file size:  1500000 bytes
  875.              Sequential Big Write   (96 * 4766 bytes)
  876.              Sequential Big Read    (273 * 4107 bytes)
  877.              Sequential Small Write (111 * 1461 bytes)
  878.              Sequential Small Read  (708 * 1900 bytes)
  879.              Small Random Write     (4 * 721 bytes)
  880.              Small Random Read      (61 * 1396 bytes)
  881.              Big Random Write       (28 * 8005 bytes)
  882.              Big Random Read        (84 * 4389 bytes)
  883.              FindFirst/FindNext     (244 / 53)
  884.              Create and Open/Close  (15 / 78)
  885.              
  886.              
  887.              The name of the PC is taken from the NetBios station name (int 21h,
  888.              Function 5Eh, Subfunction 0). It indicates "UNKNOWN" when no name
  889.              was found. The benchmarked drives are listed with, if possible, the full
  890.              redirection informations (network path).
  891.              
  892.              All the values used for this benchmark are listed under the heading
  893.              "Benchmarking protocol". The record oriented operations are described
  894.              by the number of operations and the size of the record. The FindFirst-
  895.              FindNext gives respectively the number of first file search trial and
  896.              the other, the subsequent searches. "Create and Open/Close" is com-
  897.              posed of the number of file creations and the number of file Open and
  898.              Close operations. 
  899.              
  900.              
  901.              There is one block of results for every drive in every benchmark pass.
  902.              
  903.      Benchmarking drive "C:\JMM"                         05/12/93 14:43:04
  904.      
  905.      Test file creation                       Elapsed time   4892.82 ms  (366 KB/sec)
  906.      
  907.      Big Buffers Write benchmark              Elapsed time   3908.11 ms  (149 KB/sec)
  908.      Big Buffers Read benchmark               Elapsed time   5209.55 ms  (219 KB/sec)
  909.      Small Buffers Write benchmark            Elapsed time    935.12 ms  (158 KB/sec)
  910.      Small Buffers Read benchmark             Elapsed time   6434.37 ms  (219 KB/sec)
  911.      Small Random Write benchmark             Elapsed time    241.59 ms
  912.      Small Random Read benchmark              Elapsed time   2719.84 ms
  913.      Big Random Write benchmark               Elapsed time   1738.75 ms
  914.      Big Random Read benchmark                Elapsed time   6728.02 ms
  915.      Path Search benchmark                    Elapsed time   2161.97 ms 
  916.      Create and Open/Close                    Elapsed time   2077.89 ms 
  917.      
  918.      Total Elapsed Time: 37.05   secs
  919.      
  920.      After the path specification of the location where the benchmark was
  921.              executed the date/time information, the various elapsed times are
  922.              displayed. Time are in milliseconds. Measurements are made with a
  923.              microsecond resolution. Throughput is calculated only for the sequen-
  924.              tial operation and the test file creation.
  925.              
  926.              
  927.              
  928.              This is a sample of a spreadsheet import file with the same results:
  929.              
  930.      
  931.      "Benchmark for PC: UNKNOWN"
  932.      
  933.      "C:  Local drive"
  934.      
  935.      "Benchmarking protocol: (times in micro seconds)"
  936.      
  937.      "Total temporary file size:  1500000 bytes"
  938.      "Sequential Big Write   (96 * 4766 bytes)"
  939.      "Sequential Big Read   (273 * 4107 bytes)"
  940.      "Sequential Small Write   (111 * 1461 bytes)"
  941.      "Sequential Small Read   (708 * 1900 bytes)"
  942.      "Small Random Write   (4 * 721 bytes)"
  943.      "Small Random Read   (61 * 1396 bytes)"
  944.      "Big Random Write   (28 * 8005 bytes)"
  945.      "Big Random Read   (84 * 4389 bytes)"
  946.      "FindFirst/FindNext (244 / 53)"
  947.      "Create and Open/Close (15 / 78)"
  948.      
  949.      "Date" "Time" "Drive" "Big Write" "Big Read" "Small Write" "Small Read" "Random Write" "Random Read"
  950.      "FindFirst/Next" "Create Open/Close"
  951.      "05/12/93" "14:43:42" "C:\JMM" 3908115 5209553 935116 6434367 241592 2719845 1738753 6728023
  952.      "05/12/93" "14:45:31" "C:\JMM" 4883348 6943508 983692 8370299 297540 3732805 2071831 8483663
  953.      
  954.      
  955.      
  956.                         
  957.              
  958.              
  959.              
  960.                                                                 5
  961.              
  962.                                                          Appendix
  963.               
  964.              
  965.              
  966.           Miscellaneous programs
  967.              
  968.              Following programs where added as they may be useful during analyze
  969.              and benchmarking projects.
  970.              
  971.              
  972.           STRDATE
  973.              
  974.              This program will add an environment variable, "_STRDATE" containing
  975.              the date under the form "YYMMDD". This variable can be easily used in a
  976.              batch file to create a dump file per day.
  977.              
  978.          c:\io_dump\strdate
  979.          rem If there is already a dump file for today don't compress it
  980.          if exist c:\io_dump\%_strdate%.dmp goto done
  981.          
  982.          
  983.              
  984.              
  985.           MERGEDBF
  986.              
  987.              When trying to analyze the most accessed files (HotFiles option) over a
  988.              longer period, this utility allows to merge different HOTFILE.DBF databas-
  989.              es. The file access counters are updated and automatically sorted.
  990.              
  991.                MERGEDBF Destination DBF [origin DBF]
  992.              
  993.              "Destination DBF" is the name of the new database. "Origin DBF" is the
  994.              name of the database to be merged. If this database is omitted the
  995.              contend of the first DBF is displayed, sorted by the number of total
  996.              access.
  997.              
  998.              
  999.              
  1000.                           
  1001.           IO_DUMP
  1002.              
  1003.              This program will take a binary dump file and display its contend one
  1004.              record per line in hex format. This is more a debugging tool but could
  1005.              be useful for somebody wishing to write his own dump lister/analyzer.
  1006.              
  1007.              
  1008.              
  1009.              
  1010.           Sample Installation Procedure
  1011.              
  1012.              To be able to install the program easily on a client station, you can use
  1013.              the following batch files.
  1014.              
  1015.              First build a self-extracting archive that will contain all necessary files
  1016.              and the startup batch to be placed in the AUTOEXEC.BAT, AUTOUSER.BAT
  1017.              or login procedure. A sample of such a IO_TEST.BAT is shown in the
  1018.              "Analyze Strategy" section.
  1019.              
  1020.              You can use the following batch file (PAK.BAT) to create this self-ex-
  1021.              tracting archive.
  1022.              
  1023.              pkzip -a io_test.zip IO_SNOOP.EXE STRDATE.EXE IO_TEST.BAT PKZIP.EXE
  1024.      zip2exe io_test.zip
  1025.      
  1026.      
  1027.              Put the self-extracting IO_TEST.EXE on a floppy along with the following
  1028.              installation batch (INSTALL.BAT).
  1029.              
  1030.              
  1031.              @echo off
  1032.      cls
  1033.      echo This procedure will create a directory on drive C: called C:\IO_DUMP
  1034.      echo You can start the trace automatically by adding the line to your M:\AUTOUSER.BAT
  1035.      echo      CALL C:\IO_DUMP\IO_TEST
  1036.      echo .
  1037.      pause
  1038.      md c:\io_dump
  1039.      io_test c:\io_dump\
  1040.      
  1041.      
  1042.              
  1043.              
  1044.              
  1045.              
  1046.              
  1047.      IO_SNOOP Dump File Format
  1048.              
  1049.              
  1050.              Timestamp record
  1051.              
  1052.              
  1053.              LFttttTTTT
  1054.              
  1055.              L :    record length (1 byte)
  1056.              F :    record identifier (1 byte set to 0xFF)
  1057.              tttt   :    ticks number corresponding to TT
  1058.                           TTTT   :    time in time_t format (4 bytes);
  1059.              Output for FCB functions :
  1060.              
  1061.              
  1062.              LttttFdffffffffeeeSS
  1063.              
  1064.              L :    record length (1 byte)
  1065.              tttt   :    Ticks number (4 bytes).
  1066.              F :    Function code (1 byte).
  1067.                0F   :    FCB OPEN   
  1068.                16   :    FCB CREATE   
  1069.                10   :    FCB CLOSE   
  1070.                11   :    FCB SEARCH FIRST   
  1071.                12   :    FCB SEARCH NEXT   
  1072.                13   :    FCB DELETE   
  1073.                14   :    FCB READ   
  1074.                15   :    FCB WRITE   
  1075.                21   :    FCB RANDOM READ   
  1076.                22   :    FCB RANDOM WRITE   
  1077.                27   :    FCB RANDOM BLOCK READ   
  1078.                28   :    FCB RANDOM BLOCK WRITE   
  1079.              d :    Drive letter (1 byte).
  1080.              ffffffff    :    File name (8 bytes).
  1081.              ext    :    File extension (3 bytes).
  1082.              SS     :    size in bytes (2 bytes unsigned integer).
  1083.                     - only relevant for READ/WRITE functions (14,15,21,22,27,28)
  1084.              
  1085.              
  1086.              Create File / Open File
  1087.              
  1088.              
  1089.              LttttFHZpp...pp
  1090.              
  1091.              L :    record length (1 byte)
  1092.              tttt   :    Ticks number (4 bytes).
  1093.              F :    Function code (1 byte).
  1094.                3C   :    CREATE FILE 
  1095.                3D   :    OPEN FILE 
  1096.                6C   :    EXTENDED OPEN/CREATE FILE 
  1097.              H :    File Handle (1 byte).
  1098.              Z :    System file tables (SFT) index (1 byte).
  1099.              pp..pp :    Path name (variable length).
  1100.              
  1101.              
  1102.                           
  1103.              Read File / Write File
  1104.              
  1105.              
  1106.              LttttFHZSS
  1107.              
  1108.              L :    record length (1 byte)
  1109.              tttt   :    Ticks number (4 bytes).
  1110.              F :    Function code (1 byte).
  1111.                3F   :    READ FILE 
  1112.                40   :    WRITE FILE 
  1113.              H :    File Handle (1 byte).
  1114.              Z :    System file tables index (1 byte).
  1115.              SS     :    size in bytes (2 bytes unsigned integer).
  1116.              
  1117.              
  1118.              Close File / Lseek
  1119.              
  1120.              
  1121.              LttttFHZ
  1122.              
  1123.              L :    record length (1 byte)
  1124.              tttt   :    Ticks number (4 bytes).
  1125.              F :    Function code (1 byte).
  1126.                3E   :    CLOSE FILE 
  1127.                42   :    LSEEK 
  1128.              H :    File Handle (1 byte).
  1129.              Z :    System file tables index (1 byte).
  1130.              
  1131.              
  1132.              Flock
  1133.              
  1134.              
  1135.              LttttFHZS
  1136.              
  1137.              L :    record length (1 byte)
  1138.              tttt   :    Ticks number (4 bytes).
  1139.              F :    Function code (1 byte).
  1140.                5C   :    FLOCK
  1141.              H :    File Handle (1 byte).
  1142.              Z :    System file tables index (1 byte).
  1143.              S :    Subfunction 0 = LOCK, 1 = UNLOCK
  1144.              
  1145.              
  1146.                           
  1147.              Exec File / Delete File / Find First
  1148.              
  1149.              
  1150.              LttttFpp...pp
  1151.              
  1152.              L :    record length (1 byte)
  1153.              tttt   :    Ticks number (4 bytes).
  1154.              F :    Function code (1 byte).
  1155.                4B   :    EXEC FILE 
  1156.                41   :    DELETE FILE 
  1157.                4E   :    FIND FIRST 
  1158.              pp..pp :    Path name (variable length).
  1159.              
  1160.              
  1161.              Find Next
  1162.              
  1163.              
  1164.              LttttF
  1165.              
  1166.              L :    record length (1 byte)
  1167.              tttt   :    Ticks number (4 bytes).
  1168.              F :    Function code (1 byte).
  1169.                4F   :  FIND NEXT
  1170.              
  1171.              
  1172.              
  1173.              
  1174.